package internal

// Config 总配置
type Config struct {
	Server   *Server
	Log      *Log
	Wechat   *Wechat
	DingTalk *DingTalk
}

// Server 服务器配置，存在驼峰的必须使用mapstructure
type Server struct {
	Port        string `json:"port" yaml:"port"`
	ContextPath string `mapstructure:"context_path" json:"context_path" yaml:"context_path"`
	GinMode     string `mapstructure:"gin_mode" json:"gin_mode" yaml:"gin_mode"`
}

// Log 日志配置
type Log struct {
	Path  string `json:"path" yaml:"path"`
	Level uint8  `json:"level" yaml:"level"`
}

// Wechat 企业微信配置信息
type Wechat struct {
	Url                 string `json:"url" yaml:"url"`
	AlertMsgTemplate    string `mapstructure:"alert_msg_template" json:"alert_msg_template" yaml:"alert_msg_template"`
	ResolvedMsgTemplate string `mapstructure:"resolved_msg_template" json:"resolved_msg_template" yaml:"resolved_msg_template"`
	Test                string `json:"test" yaml:"test"`
}

// DingTalk 钉钉机器人配信息
type DingTalk struct {
	Url                 string `json:"url" yaml:"url"`
	AlertMsgTemplate    string `mapstructure:"alert_msg_template" json:"alert_msg_template" yaml:"alert_msg_template"`
	ResolvedMsgTemplate string `mapstructure:"resolved_msg_template" json:"resolved_msg_template" yaml:"resolved_msg_template"`
	Test                string `json:"test" yaml:"test"`
}
